package com.ply.flashsalessystem.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ply.flashsalessystem.entity.pojo.OrderForGoodsDetaile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ply.flashsalessystem.entity.vo.OrderForGoodsDetaileVo;
import com.ply.flashsalessystem.entity.vo.manage.OrderShoppingVO;
import com.ply.flashsalessystem.entity.wrapper.OrderDetailsWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XiaoPan
 * @since 2022-03-23
 */
@Mapper
public interface OrderForGoodsDetaileMapper extends BaseMapper<OrderForGoodsDetaile> {

    Page<OrderForGoodsDetaile> queryAll(Page<OrderForGoodsDetaile> page,@Param("od") OrderDetailsWrapper orderDetailsWrapper);

    int updateStatus(@Param("oid") Integer org_d_id,
                      @Param("status") Integer status);

    /**
     * 打印采购单
     * @param page
     * @param orderDetailsWrapper
     * @return
     */
    Page<OrderShoppingVO> orderShopping(Page<OrderForGoodsDetaile> page, @Param("od") OrderDetailsWrapper orderDetailsWrapper);

    /**
     * 查询 订单详情
     * @param orderForGoodsDetaileVoPage
     * @param ofgId
     * @return
     */
    Page<OrderForGoodsDetaileVo> getOrderDetailsByOrderId(Page<OrderForGoodsDetaileVo> orderForGoodsDetaileVoPage,@Param("ofgId") Integer ofgId);
}
